<template>
  <div class="assembly">
    <!-- <div class="assembly-left">
      <div class="assembly-tab">
        <a-tabs v-model:activeKey="activeKey" @change="Handlerchange">
          <a-tab-pane v-for="item in tabData" :key="item.id" :tab="item.name"></a-tab-pane>
        </a-tabs>
      </div> -->
      <!-- <BaseAss/> -->
    <!-- </div> -->
    <!-- <div>treeId:{{treeId}}</div> -->
    <div class="box" ref="box" id="box">
      <div class="wrapper"></div>
    </div>
  </div>
</template>
<script>
import { defineComponent, inject ,nextTick,onMounted,ref} from 'vue'
// import BaseAss from './baseAss.vue'
export default defineComponent({
  setup() {
    const treeId = inject('treeId') //tree里选择的id
    const box = ref(null);
    onMounted(()=>{
          console.log(box.value)
    })
    nextTick(()=>{
       document.querySelector("#box").scrollTo({
        top: document.querySelector("#box").scrollHeight,
        //滚动过渡效果
        behavior: "smooth"
      });
    })
    return {
     treeId
    }
  },
})
</script>
<style scoped lang="less">
.box{
  width:200px;
  height:400px;
  overflow:auto;
  border:solid 1px #ddd;
}
.wrapper{
  height:600px;
}
</style>
